home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / delftips / ti2862.asc < prev    next >
Text File  |  1996-09-15  |  1KB  |  61 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.   PRODUCT  :  Delphi                                 NUMBER  :  2862
  8.   VERSION  :  All
  9.        OS  :  Windows
  10.      DATE  :  August 23, 1995                          PAGE  :  1/1
  11.  
  12.     TITLE  :  How to keep the app iconized.
  13.  
  14.  
  15.  
  16.  
  17. iconized apps
  18.  
  19. Q:  How do I keep the form in icon form when I run it?  
  20.  
  21. A:  
  22.  
  23. 1.  You must set WindowState to wsMinimized in the form's properties.
  24.  
  25. 2.  In the private section of the form object's declaration, put:
  26.  
  27.       PROCEDURE WMQueryOpen(VAR Msg : TWMQueryOpen); message WM_QUERYOPEN;
  28.  
  29. 3.  In the implementation section, put this method:
  30.  
  31.       PROCEDURE TForm1.WMQueryOpen(VAR Msg : TWMQueryOpen);
  32.       begin
  33.         Msg.Result := 0;
  34.       end;
  35.  
  36. That's it! The form will always remain iconic. 
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. DISCLAIMER: You have the right to use this technical information
  58. subject to the terms of the No-Nonsense License Statement that
  59. you received with the Borland product to which this information
  60. pertains.
  61.